Skip to content

feat: run the page on @rootnative/web - #1

Open
raajnadar wants to merge 3 commits into
mainfrom
feat/web-runtime-beta
Open

raajnadar wants to merge 3 commits into
mainfrom
feat/web-runtime-beta

Conversation

@raajnadar

@raajnadar raajnadar commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Run the page on @rootnative/web

The devhub ui page now runs on @rootnative/web in place of
react-native-web. The page source doesn't change.

What changed

  • apps/web/package.json: react-native-web is now a package alias of
    @rootnative/web-expo@0.0.0-alpha.5. Expo and Metro still ask for
    react-native-web, and they get the new runtime.
  • pnpm-lock.yaml: the new packages.
  • Three comments said "react-native-web". They now say "the web runtime".

The first commit used 0.0.0-alpha.4. The second commit moves to
0.0.0-alpha.5, which makes each render after the first one cheaper.

Why

@rootnative/web renders React Native components as plain DOM elements: a
native button, h1 to h3, and a span for text. The page is its first
real app.

On the same page, with production exports of both runtimes (Chromium, CPU
throttled 4x, medians of 10 runs):

Measure react-native-web 0.21.4 @rootnative/web alpha.5 Change
JavaScript, gzip 401,874 B 374,407 B −7 %
LCP 1,572 ms 1,372 ms −13 %
Total blocking time 281 ms 209 ms −26 %
Script time on the load 1,379 ms 1,151 ms −17 %
Project menu, open 70 ms 50 ms −29 %
Settings dialog, open 232 ms 168 ms −28 %
JS heap after the load 10.76 MB 9.97 MB −7 %
Layout time on the load 86 ms 94 ms +9 %, slower

Layout is the one measure where the new runtime is slower. The cause isn't
known yet, and it's under 1 % of the load.

How I checked it

  • Page walk: 28 steps in headless Chromium with a fake API: each screen,
    each menu and dialog, three widths, light and dark, and the desktop host
    mode. All pass. Against the same walk on react-native-web, no text or
    control moved, and the screenshots are the same.
  • Console: no new warning or error.
  • Vitest: the tests of apps/web pass.
  • Desktop app: the built page runs in the Electron host with an empty
    store: the load, the Devices and Setup pages, and the Settings dialog with
    Escape. No console warning or error. The window drag region works.
  • CI: Validate and the tests on macOS and Windows pass, with the
    production export of the page.

Not checked: the packaged desktop app from the Desktop package workflow,
and the look of the window by eye.

What you'll see in the lockfile

  • react-native-web@0.21.4 stays as an optional entry. pnpm installs it as
    the peer of the expo in example/. The page doesn't load it.
  • @react-native/normalize-colors 0.88.1 is nested under @rootnative/web.
    Metro can't load a nested package here, so the page uses the hoisted
    0.88.0. The page walk passes with it.

How to go back

Put "react-native-web": "~0.21.4" back in apps/web/package.json, and run
pnpm install.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant